package com.itheima.多态.多态的好处_06;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

//动物类
public abstract class Animal {
    public abstract void eat();
}
class Dog extends Animal{
    @Override
    public void eat() {
        System.out.println("猫吃鱼");
    }
}
class Pig extends Animal{
    @Override
    public void eat() {
        System.out.println("猪吃白菜");
    }
}
class Monkey extends Animal{
    @Override
    public void eat() {
        System.out.println("猴吃香蕉");
    }
}